<?php

namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Article;
use App\Comment_data;
class NewsController extends Controller {
    public function newslist(){
    	$news=new Article;
    	$newslist=$news->paginate(3);
        return view('home\newslist',['nlist'=>$newslist]);
    }
    public function news($nid){
    	$new=new Article;
    	$neww=$new->where('new_id',$nid)->first();
        $comm = Comment_data::where('reply' , '=' , 0)->get();
        return view('home\news',['neww'=>$neww , 'comm'=>$comm]);
    }
}
